<h1>Câmaras</h1>
  <table>
    <thead>
      <tr>
        <th>Tipo</th>
        <th>Nome</th>
        <th>Secretário</th>
        <th>Nome completo</th>
        <th>Sigla</th>
      </tr>
    </thead>
    <?php foreach ($camaras as $i => $camara): ?>
      <tr class="<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
        <td><a href="<?php echo url_for('camara/show?cd_camara='.$camara->getCdCamara()) ?>"><?php echo $camara->getTipoCamara() ?></a></td>
        <td><a href="<?php echo url_for('camara/show?cd_camara='.$camara->getCdCamara()) ?>"><?php echo $camara->name ?></a></td>
        <td><a href="<?php echo url_for('camara/show?cd_camara='.$camara->getCdCamara()) ?>"><?php echo $camara->getUsuario() ?></a></td>
        <td><a href="<?php echo url_for('camara/show?cd_camara='.$camara->getCdCamara()) ?>"><?php echo $camara->getNoLongo() ?></a></td>
        <td><a href="<?php echo url_for('camara/show?cd_camara='.$camara->getCdCamara()) ?>"><?php echo $camara->getSgCamara() ?></a></td>
      </tr>
    <?php endforeach; ?>
  </table>

<p><?php echo button_to('Nova','camara/new','class="btn"') ?>

<?php if ($pager->haveToPaginate()): ?>
<div class="div_center" >
  <div class="pagination">
    <a href="<?php echo url_for('camara/index') ?>?page=1">
      <?php echo image_tag('first.png', 'alt="Primeira página" title="Primeira página"')?>
    </a>
 
    <a href="<?php echo url_for('camara/index') ?>?page=<?php echo $pager->getPreviousPage() ?>">
      <?php echo image_tag('previous.png', 'alt="Voltar" title="Voltar"')?>
    </a>
 
    <?php foreach ($pager->getLinks() as $page): ?>
      <?php if ($page == $pager->getPage()): ?>
        <?php echo $page ?>
      <?php else: ?>
        <a href="<?php echo url_for('camara/index') ?>?page=<?php echo $page ?>"><?php echo $page ?></a>
      <?php endif; ?>
    <?php endforeach; ?>
 
    <a href="<?php echo url_for('camara/index') ?>?page=<?php echo $pager->getNextPage() ?>">
      <?php echo image_tag('next.png', 'alt="Próxima" title="Próxima"')?>
    </a>
 
    <a href="<?php echo url_for('camara/index') ?>?page=<?php echo $pager->getLastPage() ?>">
      <?php echo image_tag('last.png', 'alt="Última página" title="Última página"')?>
    </a>
  </div>
</div>
<?php endif; ?>